<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>创建就诊卡</title>
    <!-- Bootstrap -->
    <link href="../static/css/bootstrap.min.css" rel="stylesheet">
    <!-- Font Awesome -->
    <link href="../static/css/font-awesome.min.css" rel="stylesheet">
    <!-- NProgress -->
    <link href="../static/css/nprogress.css" rel="stylesheet">
    <!-- iCheck -->
    <link href="../static/css/green.css" rel="stylesheet">
    <!-- bootstrap-progressbar -->
    <link href="../static/css/bootstrap-progressbar-3.3.4.min.css" rel="stylesheet">
    <!-- JQVMap -->
    <link href="../static/css/jqvmap.min.css" rel="stylesheet" />
    <link href="../static/css/dropzone.min.css" rel="stylesheet">
    <!-- Custom Theme Style -->
    <link href="../static/css/custom.min.css"	rel="stylesheet">

    <!-- add localcss 2016-8-18 -->
    <link href='../static/localcss/appinfoadd.css' rel='stylesheet'>
    <link href='../static/localcss/appinfolist.css' rel='stylesheet'>
</head>
<body class="nav-md footer_fixed">
<div class="container body">
    <div class="main_container">
        <div class="col-md-3 left_col menu_fixed">
            <div class="left_col scroll-view">
                <div class="navbar nav_title" style="border: 0;">
                    <a href="#" class="site_title"><i class="fa fa-paw"></i> <span>APP
								BMS</span>
                    </a>
                </div>

                <div class="clearfix"></div>

                <!-- menu profile quick info -->
                <div class="profile">
                    <div class="profile_pic">
                        <img
                                src="../static/images/img.jpg"
                                alt="..." class="img-circle profile_img">
                    </div>
                    <div class="profile_info">
                        <span>Welcome,</span>
                        <h2>李四</h2>
                    </div>
                </div>
                <!-- /menu profile quick info -->

                <br />

                <!-- sidebar menu -->
                <div id="sidebar-menu"
                     class="main_menu_side hidden-print main_menu">
                    <div class="menu_section">
                        <h3>李四</h3>
                        <ul class="nav side-menu">
                            <li><a><i class="fa fa-home"></i> 挂号管理 <span
                                    class="fa fa-chevron-down"></span>
                            </a>
                                <ul class="nav child_menu">
                                    <li><a href="/registry/toRegistry">创建就诊卡</a>
                                    </li>
                                    <li><a href="/registry/toAddRegistry">门诊挂号</a>
                                    </li>
                                    <li><a href="/registry/toSelectAll">挂号信息</a>
                                    </li>
                                </ul></li>
                        </ul>
                    </div>


                </div>
                <!-- /sidebar menu -->

                <!-- /menu footer buttons -->
                <div class="sidebar-footer hidden-small">
                    <a data-toggle="tooltip" data-placement="top" title="Settings">
                        <span class="glyphicon glyphicon-cog" aria-hidden="true"></span>
                    </a> <a data-toggle="tooltip" data-placement="top" title="FullScreen">
                    <span class="glyphicon glyphicon-fullscreen" aria-hidden="true"></span>
                </a> <a data-toggle="tooltip" data-placement="top" title="Lock"> <span
                        class="glyphicon glyphicon-eye-close" aria-hidden="true"></span>
                </a> <a data-toggle="tooltip" data-placement="top" title="Logout"
                        href="${pageContext.request.contextPath }/dev/logout"> <span
                        class="glyphicon glyphicon-off" aria-hidden="true"></span> </a>
                </div>
                <!-- /menu footer buttons -->
            </div>
        </div>

        <!-- top navigation -->
        <div class="top_nav">
            <div class="nav_menu">
                <nav>
                    <div class="nav toggle">
                        <a id="menu_toggle"><i class="fa fa-bars"></i>
                        </a>
                    </div>

                    <ul class="nav navbar-nav navbar-right">
                        <li class=""><a href="javascript:;"
                                        class="user-profile dropdown-toggle" data-toggle="dropdown"
                                        aria-expanded="false"> <img
                                src="../static/images/img.jpg"
                                alt="">李四 <span
                                class=" fa fa-angle-down"></span> </a>
                            <ul class="dropdown-menu dropdown-usermenu pull-right">
                                <li><a
                                        href="#"><i
                                        class="fa fa-sign-out pull-right"></i> Log Out</a>
                                </li>
                            </ul></li>

                        <li role="presentation" class="dropdown">

                            <ul id="menu1" class="dropdown-menu list-unstyled msg_list"
                                role="menu">
                                <li><a> <span class="image"><img
                                        src="../static/images/img.jpg"
                                        alt="Profile Image" />
										</span> <span> <span>John Smith</span> <span class="time">3
													mins ago</span> </span> <span class="message"> Film festivals used
												to be do-or-die moments for movie makers. They were where...
										</span> </a></li>
                                <li><a> <span class="image"><img
                                        src="../static/images/img.jpg"
                                        alt="Profile Image" />
										</span> <span> <span>John Smith</span> <span class="time">3
													mins ago</span> </span> <span class="message"> Film festivals used
												to be do-or-die moments for movie makers. They were where...
										</span> </a></li>
                                <li><a> <span class="image"><img
                                        src="../static/images/img.jpg"
                                        alt="Profile Image" />
										</span> <span> <span>John Smith</span> <span class="time">3
													mins ago</span> </span> <span class="message"> Film festivals used
												to be do-or-die moments for movie makers. They were where...
										</span> </a></li>
                                <li><a> <span class="image"><img
                                        src="../static/images/img.jpg"
                                        alt="Profile Image" />
										</span> <span> <span>John Smith</span> <span class="time">3
													mins ago</span> </span> <span class="message"> Film festivals used
												to be do-or-die moments for movie makers. They were where...
										</span> </a></li>
                                <li>
                                    <div class="text-center">
                                        <a> <strong>See All Alerts</strong> <i
                                                class="fa fa-angle-right"></i> </a>
                                    </div></li>
                            </ul></li>
                    </ul>
                </nav>
            </div>
        </div>
        <!-- /top navigation -->
        <div class="right_col" role="main">
            <div class="">
                <div class="clearfix"></div>
                <div class="row">
                    <div class="col-md-12 col-sm-12 col-xs-12">
                        <div class="x_panel">
                            <div class="x_title">
                                <h2>创建就诊卡</h2>
                                <div class="clearfix"></div>
                            </div>
                            <div class="x_content">

                                <div class="clearfix"></div>
                                <form class="form-horizontal form-label-left" action="/patient/addPatient" method="post">
                                    <div class="item form-group">
                                        <label class="control-label col-md-3 col-sm-3 col-xs-12">病人姓名 <span class="required">*</span>
                                        </label>
                                        <div class="col-md-6 col-sm-6 col-xs-12">
                                            <input id="softwareName" class="form-control col-md-7 col-xs-12"
                                                   data-validate-length-range="20" data-validate-words="1" name="name"  required="required"
                                                   placeholder="请输入病人姓名" type="text">
                                        </div>
                                    </div>
                                    <div class="item form-group">
                                        <label class="control-label col-md-3 col-sm-3 col-xs-12">手机号 <span class="required">*</span>
                                        </label>
                                        <div class="col-md-6 col-sm-6 col-xs-12">
                                            <input id="APKName" class="form-control col-md-7 col-xs-12"
                                                   data-validate-length-range="20" data-validate-words="1" name="phone"   required="required"
                                                   placeholder="请输入手机号" type="text">
                                        </div>
                                    </div>

                                    <div class="item form-group">
                                        <label class="control-label col-md-3 col-sm-3 col-xs-12">家庭住址 <span class="required">*</span>
                                        </label>
                                        <div class="col-md-6 col-sm-6 col-xs-12">
                                            <input id="supportROM" class="form-control col-md-7 col-xs-12" name="address"
                                                   data-validate-length-range="20" data-validate-words="1"   required="required"
                                                   placeholder="请输入家庭住址" type="text">
                                        </div>
                                    </div>
                                    <div class="item form-group">
                                        <label class="control-label col-md-3 col-sm-3 col-xs-12">医保卡号 <span class="required">*</span>
                                        </label>
                                        <div class="col-md-6 col-sm-6 col-xs-12">
                                            <input id="interfaceLanguage" class="form-control col-md-7 col-xs-12"
                                                   data-validate-length-range="20" data-validate-words="1" name="idMedicare"
                                                   placeholder="请输入医保卡号" type="text">
                                            <br>
                                            <span style="color: red;display: none" name="idMedicareError">该医保卡已存在，请重新输入.......</span>
                                        </div>
                                    </div>
                                    <div class="item form-group">
                                        <label class="control-label col-md-3 col-sm-3 col-xs-12">身份证号 <span class="required">*</span>
                                        </label>
                                        <div class="col-md-6 col-sm-6 col-xs-12">
                                            <input type="text" id="softwareSize" name="idCard"   required="required"
                                                 placeholder="请输入身份证号" class="form-control col-md-7 col-xs-12"
                                            maxlength="18">
                                            <br>
                                            <span style="color: red;display: none" name="idCardError">该身份证号已经创建就诊卡，请重新输入.......</span>
                                        </div>
                                    </div>

                                    <div class="item form-group">
                                        <label class="control-label col-md-3 col-sm-3 col-xs-12">出生日期 <span class="required">*</span>
                                        </label>
                                        <div class="col-md-6 col-sm-6 col-xs-12">
                                            <input type="text" id="downloads" name="birthday"   readonly="true"
                                                   data-validate-minmax="10,500"  class="form-control col-md-7 col-xs-12">
                                        </div>
                                    </div>

                                    <div class="item form-group">
                                        <label class="control-label col-md-3 col-sm-3 col-xs-12">性别 <span class="required">*</span></label>
                                        <div class="col-md-6 col-sm-6 col-xs-12">
                                            <select name="sex" type="text" id="flatformId" class="form-control"   readonly="readonly">
                                                <option value="0"></option>
                                                <option value="男">男</option>
                                                <option value="女">女</option>
                                            </select>
                                        </div>
                                    </div>

                                    <div class="ln_solid"></div>
                                    <div class="form-group">
                                        <div class="col-md-6 col-md-offset-3">
                                            <button id="send" type="submit" class="btn btn-success">保存</button>
                                            <button type="button" class="btn btn-primary" id="back" onclick="history.back()">返回</button>
                                            <br/><br/>
                                        </div>
                                    </div>
                                </form>
                            </div>
                        </div>
                    </div>
                </div>

            </div>
        </div>
        <!-- /page content -->
        <!-- footer content -->
        <footer>
            <div class="pull-right">©2016 All Rights Reserved.</div>
            <div class="clearfix"></div>
        </footer>
        <!-- /footer content -->
    </div>
</div>
<!-- jQuery -->
<script src="../static/js/jquery.min.js"></script>
<!-- Bootstrap -->
<script src="../static/js/bootstrap.min.js"></script>
<!-- FastClick -->
<script src="../static/js/fastclick.js"></script>
<!-- NProgress -->
<script src="../static/js/nprogress.js"></script>
<!-- jQuery custom content scroller -->
<script src="../static/js/jquery.mCustomScrollbar.concat.min.js"></script>
<!-- Custom Theme Scripts -->
<script src="../static/js/custom.min.js"></script>
<!-- validator -->
<%--     <script src="../static/js/validator.js"></script> --%>
<!-- dropzone -->
<script src="../static/js/dropzone.js"></script>
<script src="../static/js/jquery-3.6.0.js"></script>
<script>
    $("[name=idCard]").blur(function(){
        $.getJSON("/patient/checkAddPatient",{
            "idCard":$("[name=idCard]").val(),
            "idMedicare":$("[name=idMedicare]").val()
        },function(data){
            if(data==1){
                $("[name=idCardError]").hide();
                $("[name=idMedicareError]").hide();
            }else if(data==2){
                $("[name=idCardError]").show();
                $("[name=idMedicareError]").hide();
            }else if(data==3){
                $("[name=idCardError]").hide();
                $("[name=idMedicareError]").show();
            }else{
                $("[name=idCardError]").show();
                $("[name=idMedicareError]").show();
            }
        })
        $("[name=birthday]").val($(this).val().substring(6,10)+"-"+$(this).val().substring(10,12)+"-"+$(this).val().substring(12,14));
            if($(this).val().substring(16,17)%2==0){
                $("[name=sex]").val("女");
                alert($(this.val());
            }else{
                $("[name=sex]").val("男");
            }
    })

    $("[name=idMedicare]").blur(function(){

    })


</script>
</body>
</html>